What is the meaning of the word "judge advocate general"?

Definitions:

  1. the senior legal advisor to a branch of the military copy to clipboard noun
    • The judge advocate general set the rules for the military tribunal. copy to clipboard